--- @param extension Package
--- @param HY HY_Utility
--- @param U Utility
return function(extension, HY, U)
    local hy_kaenbyou_rin = General:new(extension, "hy_kaenbyou_rin", "jin_k", 4, 4, General.Female)
    local welcome_funeral = fk.CreateSkill {
        name = "welcome_funeral",
    }
    welcome_funeral:addEffect(fk.EnterDying, {
        anim_type = "defensive",
        can_trigger = function(self, event, target, player, data)
            if not player:hasSkill(welcome_funeral.name) or target ~= player then
                return false
            end
            local room = player.room
            return #room.alive_players == #room.players
        end,
        on_cost = Util.TrueFunc,
        on_use = function(self, event, target, player, data)
            local room = player.room
            room:recover({
                who = player,
                num = 1,
                skillName = welcome_funeral.name,
                recoverBy = player,
            })
        end
    })
    welcome_funeral:addEffect(fk.EventPhaseStart, {
        anim_type = "defensive",
        can_trigger = function(self, event, target, player, data)
            if not player:hasSkill(welcome_funeral.name) or target ~= player then
                return false
            end
            local room = player.room
            return #room.players - #room.alive_players > 0 and player.phase == Player.Start
        end,
        on_cost = Util.TrueFunc,
        on_use = function(self, event, target, player, data)
            local room = player.room
            room:drawCards(player, #room.players - #room.alive_players, welcome_funeral.name)
        end
    })
    local cat_step = fk.CreateSkill {
        name = "cat_step",
    }
    cat_step:addEffect(fk.TargetSpecified, {
        anim_type = "control",
        can_trigger = function(self, event, target, player, data)
            return player:hasSkill(cat_step.name) and player == target and data.card and data.card.trueName == "slash" and #data:getAllTargets() == 1 and not player:isKongcheng()
        end,
        on_cost = function(self, event, target, player, data)
            return player.room:askToSkillInvoke(player, {
                skill_name = cat_step.name,
                prompt = "cat_step_prompt::" .. data.to.id
            })
        end,
        on_use = function(self, event, target, player, data)
            local room = player.room
            local skillTarget = data.to
            local card = room:askToChooseCard(skillTarget, {
                target = player,
                flag = "h",
                skill_name = cat_step.name
            })
            room:throwCard(card, cat_step.name, player, skillTarget)
            if Fk:getCardById(card).type ~= Card.TypeBasic then
                if #skillTarget:getCardIds("he") > 0 then
                    local get = room:askToChooseCard(player, {
                        target = skillTarget,
                        flag = "he",
                        skill_name = cat_step.name
                    })
                    room:obtainCard(player, get, false, fk.ReasonPrey, player)
                end
                data.disresponsive = true
            elseif not player.dead then
                room:drawCards(player, 1, cat_step.name)
                room:addPlayerMark(player, "cat_step-phase", 1)
            end
        end
    })
    cat_step:addEffect("targetmod", {
        residue_func = function(self, player, skill, scope, card, to)
            if scope == Player.HistoryPhase and player:hasSkill(cat_step.name) and card.trueName == "slash" then
                return player:getMark("cat_step-phase")
            end
        end
    })
    extension:loadSkillSkels { welcome_funeral, cat_step }
    hy_kaenbyou_rin:addSkill("welcome_funeral")
    hy_kaenbyou_rin:addSkill("cat_step")
    Fk:loadTranslationTable {
        ["hy_kaenbyou_rin"] = "火焰猫燐",
        ["#hy_kaenbyou_rin"] = "与尸同行",
        ["illustrator:hy_kaenbyou_rin"] = "羽々斬",
        ["designer:hy_kaenbyou_rin"] = "黑曜人形",
        ["cv:hy_kaenbyou_rin"] = "",

        ["welcome_funeral"] = "葬迎",
        [":welcome_funeral"] = "当你进入濒死状态时，若没有角色死亡，你回复1点体力。准备阶段，你摸X张牌（X为死亡角色数）。",
        ["welcome_funeral_prompt"] = "葬迎：你可以摸%arg张牌，或于结束阶段摸牌",

        ["cat_step"] = "猫步",
        [":cat_step"] = "在你使用【杀】指定唯一目标后，你可以令其弃置你一张手牌：若此牌不为基本牌，你获得其一张牌且此【杀】不可被响应；否则你摸一张牌且本阶段使用【杀】的次数+1。",
        ["cat_step_prompt"] = "猫步：你可以令%dest弃置你一张手牌",
    }
end
